local unitName  =  "armstump"

local unitDef  =  {
--Internal settings
    buildpic = "ARMSTUMP.DDS",
    Category = "KILLABLE",
    ObjectName = "armstump.3do",
    name = "Stumpy",
    Side = "TANKS",
    UnitName = "armstump",
    script = "armstump.cob",
    
--Unit limitations and properties
    BuildTime = 10,
    Description = "Medium range unit",
    MaxDamage = 3200,
    RadarDistance = 0,
    SightDistance = 400,
    SoundCategory = "TANK",
    Upright = 0,
    
--Energy and metal related
    BuildCostEnergy = 0,
    BuildCostMetal = 50,
    
--Pathfinding and related
    Acceleration = 0.15,
    BrakeRate = 0.1,
    FootprintX = 2,
    FootprintZ = 2,
    MaxSlope = 15,
    MaxVelocity = 2.0,
    MaxWaterDepth = 20,
    MovementClass = "Default2x2",
    TurnRate = 900,
    
--Abilities
    Builder = 0,
    CanAttack = 1,
    CanGuard = 1,
    CanMove = 1,
    CanPatrol = 1,
    CanStop = 1,
    LeaveTracks = 0,
    Reclaimable = 0,

	customparams = {
		unitcost = "1",
	},
	
--Weapons and related
    ExplodeAs = "TANKDEATH",

	weapons = {
		[1] = {
			def = "arm_lightcannon",
			BadTargetCategory = "UNKILLABLE",
			NoChaseCategory = "UNKILLABLE",
			OnlyTargetCategory = "KILLABLE",			
		},
	},
}

local weaponDefs = {
		arm_lightcannon = {
			name = "LightCannon",
			weapontype = "Cannon",
			accuracy = 10,
			areaofeffect = 48,
			avoidfeature = false,
			avoidfriendly = false,
			canattackground = true,
			collidefriendly = false,
			collisionsize = 8,
			commandfire = false,
			craterboost = 0,
			cratermult = 0,
			edgeeffectiveness = 0,
			explosionspeed = 128,
			impulseboost = 0.0,
			impulsefactor = 0.0,
			intensity = 0.69999998807907,
			noselfdamage = true,
			size = 1.75,
			soundstart = "canlite3",
			soundhit = "xplosml3",				
			range = 350,
			reloadtime = 1.1900000572205,
			rgbcolor = "1 0.95 0.4",
			turret = true,
			weaponvelocity = 225,
			gravityaffected = "true",
			damage = {
				default = 97,
				unkillable = 0,				
			},
		},
	}

unitDef.weaponDefs = weaponDefs

return lowerkeys({ [unitName]  =  unitDef })